<template>
  <div id="app">
    <at-menu theme="dark" mode="horizontal" active-name="1" v-if="debug">
      <!-- <div v-for="(li,index) in links" :key="index">
        <at-submenu>
          <template slot="title">
            {{li.name}}
          </template>
          <at-menu-item
            :to="{name:link.link}"
            name="link.link"
            v-for="(link,index) in li.list"
            :key="index"
          >{{link.name}}</at-menu-item>
        </at-submenu>
      </div> -->
      <at-menu-item name="1"  ><i class="icon icon-alert-octagon"></i><span @click="showCookies(cookies)" >Cookie Info</span> </at-menu-item>
       <at-menu-item name="1"  >发布时请修改 Store 里面的debug为：false </at-menu-item>      
    </at-menu>
    <router-view />
  </div>
</template>

<style >
/* @import url('/common/fonts/fonts.css'); */

.hdbtn{
  display: none;
  font-size: 20px;
   }

body{
  font-size: 1.5rem;
  font-family: 'FZXBSJW';
}
.at-menu__submenu {
  min-width: 16rem;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 1rem;
}
#nav a {
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  color: #42b983;
}
</style>
<script >
import { mapState, mapMutations } from "vuex";
export default {
  data() {
    return {
      links: [
        {
          name: "全区数据表",
          list: [
            {
              name: "1.1.1-信访监察举报月度变化趋势图",
              link: "p111"
            }
          ]
        },
        {
          name: "各街镇",
          list: [
            {
              name: "2.1.1-镇街信访举报总量检测图",
              link: "p211"
            },
            {
              name: "2.1.2-镇街信访举报检举控告量检测图",
              link: "p212"
            },
            {
              name: "2.1.3-镇街信访举报重复访量检测图",
              link: "p213"
            },
            {
              name: "2.2.1-纪检监察信访举报月度变化趋势图",
              link: "p221"
            },
            {
              name: "2.2.2-西湖区 1-X月镇街信访举报对比图",
              link: "p222"
            },
            {
              name: "2.3.1-西湖区 1-X月镇街检举控告信访占比图",
              link: "p231"
            },
            {
              name: "2.4.1-西湖区 1-X月村社信访举报对比图",
              link: "p241"
            },
            {
              name: "2.4.2-西湖区 1-X月各镇街涉纪举报村社占比图",
              link: "p242"
            },
            {
              name: "2.5.1-西湖区 1-X月各镇街信访质量评定结果图",
              link: "p251"
            },
            {
              name: "2.6.1-2020年 1-X月各镇街纪检监察信访办理情况统计",
              link: "p261"
            }
          ]
        },
        {
          name: "区属主要涉信单位及派驻机构",
          list: [
            {
              name: "3.1.1-西湖区区属单位纪检监察信访举报检测图",
              link: "p311"
            },
            {
              name: "3.2.1-西湖区派驻（出）机构检举控告量对比图",
              link: "p321"
            }
          ]
        }
      ]
    };
  },
  computed: mapState(["cookies",'debug']),
  mounted() {
    // this.updateCookies();
  },
  methods: {
    ...mapMutations(["updateCookies"]),
    showCookies(cookies) {
      this.$Modal.alert({
        content: cookies
      });
    }
  }
};
</script>
